home *** CD-ROM | disk | FTP | other *** search
- *-------------------------------------------------------------------------------
- *-- Program...: CONFIG.PRG
- *-- Programmer: Ken Mayer
- *-- Date......: 06/12/1992
- *-- Notes.....: This is a small program designed to handle calling the
- *-- appropriate configuration programs (color/printer).
- *-------------------------------------------------------------------------------
-
- save screen to sConfig
- cConColor = set("ATTRIBUTE")
- clear
- x=scrnhead("&cStand2","Configuration of BOR-BBS USERS System")
- lColorchg = .f. && used just inside the loop
- set safety off && turn it off for some of the processing here ...
-
- *--------------------------------------------------------------------------
- *-- Removed the 'outer loop' here ...
- *--------------------------------------------------------------------------
-
- cConfig = " "
- @12,10 say "Configure [C]olors or [P]rinters? " get cConfig;
- picture "!" valid required cConfig $ " CP";
- error chr(7)+"Enter 'C' or 'P'"
- @14,10 say "Press <Enter> to return to menu ..."
- read
-
- if cConfig = "C"
-
- lMono = .f.
- lVGA = .f.
-
- @14,0 clear
- if upper(cStand) = "W+/N" .or. iscolor() = .f. && we have monochrome
- lMono = .t.
- endif
- if file("CLRDESC.MEM") && we have (theoretically) VGA
- lVGA = .t.
- endif
-
- *-- if we have VGA, we need to ask some questions ...
- if lVGA
- cYN = " "
- @14,10 say "You have currently have VGA as your setup."
- @15,10 say "Do you wish to change this? " get cYN picture "!";
- valid required cYN $ "YN" error chr(7)+"Enter 'Y' or 'N'"
- @17,10 say "(Change to Monochrome or non-VGA?)"
- read
-
- if cYN = "N"
- @16,0 clear
- cYN = " "
- *-- change the values of the 'guns'?
- @17,10 say "Do you wish to change the color values of the VGA?";
- get cYN picture "!" valid required cYN $ "YN";
- error chr(7)+"Enter 'Y' or 'N'"
- @18,10 say "This option only changes VGA Scale colors, not"
- @19,10 say "colors assigned in programs. See documentation file"
- @20,10 say "COLORCTL.TXT attached ..."
-
- read
- if cYN = "Y"
- do setclr && program to toy with vga scale colors ...
- lColorchg = .t.
- endif
-
- else && user wants to change to either mono or non-vga color
-
- *-- first, we remove the VGA descriptions ...
- save screen to sVGA
- set console off
- erase clrdesc.mem && delete file
- copy file clrdesc.def to clrdesc.mem
- do cdefault
- erase clrdesc.mem
- lcolorchg = .t.
- set console on
- restore screen from sVGA
- release screen sVGA
-
- *-- next we ask if they want MONO or "regular" color?
- cYN = " "
- @16,0 clear
- @17,10 say "Do you wish to change to monochrome? " get cYN;
- picture "!" valid required cYN $ "YN";
- error chr(7)+"Enter 'Y' or 'N'"
- read
-
- if cYN = "Y" && change to mono
-
- do mono
-
- endif && cYN = "Y"
-
- endif && cYN = "N" -- change to mono or non-vga
-
- endif && lVGA
-
- if lMono
- cYN = " "
- @14,10 say "You currently have monochrome."
- @15,10 say "Do you wish to change this to color?" get cYN;
- picture "!" valid required cYN $ "YN";
- error chr(7)+"Enter 'Y' or 'N'"
- read
-
- if cYN = "Y"
-
- @12,0 clear
- do colors
-
- lColorChg = .t.
- *-- check for VGA ...
- if yesno(.t.,"Do you have VGA?","","","&cl_wind1")
- set safety off
- copy file clrdesc.fil to clrdesc.mem
- set safety on
- endif
- endif
-
- endif && lMono
-
- *-- we have color, but not mono, and not vga ...
- if .not. lMono .and. .not. lVGA
-
- @12, 0 clear
- @14,10 say "You are not set for monochrome or VGA."
- @15,10 say "You ARE set for 'normal' color."
- cYN = " "
- @16,10 say "Do you wish to change this? " get cYN picture "!";
- valid required cYN $ "YN" error chr(7)+"Enter 'Y' or 'N'"
- read
-
- if cYN = "Y"
- lColorChg = .t.
- @14, 0 clear
- if yesno(.f.,"Change to Monochrome?","Yes=Monochrome","No=VGA",;
- "&cl_wind1")
-
- do mono && routine below to deal with monochrome
-
- *-- VGA
- else
- set console off
- copy file clrdesc.fil to clrdesc.mem
- do cdefault
- set console on
- endif && yesno()
- endif
-
- endif && .not. mono/vga
-
- endif && cConfig = "C"
-
- if cConfig = "P"
-
- do pConfig && printer configuration routine by Bowen Moursund,
- && heavily modified by yours truly.
- endif && cConfig = "P"
-
- *-- used to be an ENDDO here, but removed ...
- @5,0 clear
- if lColorChg
- @7,12 say "You have changed your colors. To see the changes,"
- @8,12 say "choose the menu option: 'Exit to dBASE',"
- @9,12 say "and restart the system (DO MENU) at the 'dot' prompt."
- set cursor off
- x=inkey(0)
- set cursor on
- endif
-
- *-- Cleanup
- restore screen from sConfig
- release screen sConfig
- do ReColor with cConColor && reset colors
- set safety on && turn it back on
- RETURN
-
- *-------------------------------------------------------------------------------
- *-- End of Program: CONFIG.PROG
- *-------------------------------------------------------------------------------
-
- PROCEDURE Mono
-
- *-- set monochrome ...
- if iscolor() && not a monochrome card
- cStand = "w+/n"
- cStand2 = "n/w"
- cStand3 = "n+/w"
- else
- cStand = "w/n"
- cStand2 = "wI/N"
- cStand3 = "wU/n"
- endif
- *-- now we have the 'colors', let's set all the 'usual' stuff
- set safety off
- save all like cStand* to color
- set safety on
- cl_wind1 = "&cStand2,&cStand,&cStand2"
- cl_wind2 = "&cStand3,&cStand2,&cStand3"
- cl_wind3 = "&cStand,&cStand2,&cStand"
- *-- set 'main' colors
- set color of normal to &cStand
- set color of message to &cStand2
- set color of box to &cStand2
- set color of highlight to &cStand
-
- RETURN
-
- PROCEDURE Colors
-
- cStand = "W+/b"
- cStand2 = "rg+/gb"
- cStand3 = "rg+/r"
-
- *-- now we have the 'colors', let's set all the 'usual' stuff
- set safety off
- save all like cStand* to color
- set safety on
- cl_wind1 = "&cStand2,&cStand,&cStand2"
- cl_wind2 = "&cStand3,&cStand2,&cStand3"
- cl_wind3 = "&cStand,&cStand2,&cStand"
- *-- set 'main' colors
- set color of normal to &cStand
- set color of message to &cStand2
- set color of box to &cStand2
- set color of highlight to &cStand
-
- RETURN